package com.product.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.product.entity.ProductBigdata;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;


/**
 * 大数据盘表(ProductBigdata)表数据库访问层
 *
 * @author makejava
 * @since 2024-06-18 15:07:35
 */
@Mapper
public interface ProductBigdataDao extends BaseMapper<ProductBigdata> {
    //查询销量top20
    @MapKey("name")
    Map<String, Object> Top20(@Param("start") LocalDate start, @Param("end") LocalDate end);

    //查询兑换方式
    @MapKey("pay_id")
    List<Map<String, Object>> ExchangeMethod(@Param("start") LocalDate start, @Param("end") LocalDate end);

    long DataStatistics(LocalDate date);
}

